Time Equations for Lazy Functional (Logic) Languages

نویسندگان

  • Elvira Albert
  • Josep Silva
  • Germán Vidal
چکیده

There are very few approaches to measure the execution costs of lazy functional (logic) programs. The use of a lazy execution mechanism implies that the complexity of an evaluation depends on its context, i.e., the evaluation of the same expression may have different costs depending on the degree of evaluation required by the different contexts where it appears. In this paper, we present a novel approach to complexity analysis of functional (logic) programs. We focus on the construction of equations which compute the time-complexity of expressions. In contrast to previous approaches, it is simple, precise—i.e., it computes exact costs rather than upper/lower bounds—, and fully automatic.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Functional Programming Approach to Deductive Databases

We introduce a persistent functional language called PFL which adapts functional programming to the area of deductive databases, much as logic-based deductive database languages adapt logic programming. PFL inherits the advantages of functional programming languages, including higher-order functions, static type checking, lazy evaluation, and support for user-defined types and constants. Howeve...

متن کامل

On the Relation Between a Rewriting Computational Model for Functional Logic Languages and Or-Parallelism

The programming language Escher introduced a rewriting computational model for functional logic languages. In this model, computation is regarded as the application of successive rewrite steps to a goal expression until the expression reaches a normal form. This is in contrast to the common operational basis of logic programming , namely the depth-rst traversal of a search tree, which is usuall...

متن کامل

Specialization of functional logic programs based on needed narrowing

Many functional logic languages are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction mechanism of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal evaluation strategy which constitutes the basis of modern (narrowing-based) lazy functional logic languages. In this work, we present the fundamentals of p...

متن کامل

From Functional Logic Programs to Purely Functional Programs Preserving Laziness

Functional logic languages extend the setting of functional programming by non-deterministic choices, free variables and narrowing. Most existing approaches to simulate logic features in functional languages do not preserve laziness, i.e., they can only model strict logic programming like in Prolog. Lazy functional logic programming however, has interesting properties supporting a more declarat...

متن کامل

The additional difficulties for the automatic synthesis of specifications posed by logic features in functional-logic languages

This paper discusses on the additional issues for the automatic inference of algebraic propertyoriented specifications which arises because of interaction between laziness and logical variables in lazy functional logic languages. We present an inference technique that overcomes these issues for the first-order fragment of the lazy functional logic language Curry. Our technique statically infers...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003